package db.domain;

import lombok.Data;
import sf.core.DBField;
import sf.core.DBObject;
import sf.database.annotations.Comment;

import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Data
@Entity
@Table(name = "org")
@Cacheable
public class Org extends DBObject {
    @Comment("主键")
    @Id
    private String id;
    @Comment("父id")
    @Column(name = "parent_id")
    private String parentId;
    @Comment("名称")
    @Column
    private String name;

    public enum Field implements DBField {
        id, parentId, name;
    }
}
